import { defineComponent, ref } from "vue";
import styles from "./Paytype.module.scss";

export default defineComponent({
  props: {
    form: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  setup(props) {
    const payTypes = ref([
      {
        text: '聚合支付',
        value: 'sfypay',
      },
      // {
      //   text: '医保个账支付',
      //   value: 'compay',
      // },
    ])
    return () => (
      <div class={styles['pay-type']}>
        <span class={styles['label']}>支付方式</span>
        <div class={styles['pay-selector']}>
          {
            payTypes.value.map((item: any) => (
              <div class={[styles['pay-item'], props.form.payType === item.value && styles.checked]} onClick={() => { props.form.payType = item.value }}>
                {item.text}
              </div>
            ))
          }
        </div>
      </div>
    )
  }
})